import axios from '../utils/axios'

let getbannerData=()=>{
    let url = '/trains/banners/'
    return axios.get(url)
}

let getpublicData=()=>{
    let url = '/trains/index_public_courses/'
    return axios.get(url)
}

let getdepartmentData=()=>{
    let url = '/trains/index_department_courses/'
    return axios.get(url)
}

let getteachersData=()=>{
    let url = '/trains/index_teachers/'
    return axios.get(url)
}

let getcommentsData=(course_id,page,page_size)=>{
    let url = '/trains/course_comments/'
    return axios.get(url,{course_id,page,page_size})
}

let subcomment=(course,comments,)=>{
    let url = '/trains/create_course_comments/'
    return axios.post(url,{course,comments})
}

let studentsclass=(course_id,page,page_size)=>{
    let url = '/trains/course_students/'
    return axios.get(url,{course_id,page,page_size})
}

let getmorelistData=(department,page,page_size)=>{
    let url = '/trains/list_courses/'
    return axios.get(url,{department,page,page_size})
}

let getteacherlistData=(teacher_id,page,page_size)=>{
    let url = '/trains/teacher_courses/'
    return axios.get(url,{teacher_id,page,page_size})
}

export{
    getbannerData,
    getpublicData,
    getdepartmentData,
    getteachersData,
    getcommentsData,
    subcomment,
    studentsclass,
    getmorelistData,
    getteacherlistData
}